<template>
  <div>
    <el-descriptions title="我的详细资料" :column="1" border>
      <el-descriptions-item label="用户" label-align="left" align="left">{{
        user.username
      }}</el-descriptions-item>
      <el-descriptions-item label="密码" label-align="left" align="left">{{
        user.realname
      }}</el-descriptions-item>
      <el-descriptions-item label="电话" label-align="left" align="left">{{
        user.phone
      }}</el-descriptions-item>
      <el-descriptions-item
        label="最近登录时间"
        label-align="left"
        align="left"
        >{{ user.gmtLastLogin }}</el-descriptions-item
      >
      <el-descriptions-item label="角色" label-align="left" align="left">{{
        user.roles
      }}</el-descriptions-item>
      <el-descriptions-item label="状态" label-align="left" align="left"
        ><el-button type="primary">{{
          user.status ? "正常" : "异常"
        }}</el-button></el-descriptions-item
      >
    </el-descriptions>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  computed: {
    ...mapGetters(["user"]),
  },
};
</script>

<style></style>
